<?php
$str = "myupload/2.jpg";

$q = substr($str,9);

$qq = explode(".",$q);

//var_dump($qq);

$img = explode(".",substr($picurl[1],9));

$new = "thumb/".$img[0]."_th.".$img[1];
echo $new;
?>